import { ReactNode } from 'react'
import styles from './myTag.module.less'

type IProps = {
  readonly children: ReactNode
  readonly checked: boolean
  readonly onClick?: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void
}

export default function MyTag(props: IProps) {
  return (
    <span className={styles.myTag + ' ' + (props.checked ? styles.myTagChecked : '')} onClick={props.onClick}>
      {props.children}
    </span>
  )
}
